<div>
  <h1>moduleList</h1>
  <el-tabs>
    <el-tab-pane label="配置">
      <el-form ref="form" :model="eventForm" label-width="80px">
        <el-form-item label="事件名称" :label-width="formLabelWidth" >
          <el-input v-model="form.name" placeholder="请输入事件名称" ></el-input>
        </el-form-item>

        <el-form-item label="事件类型" :label-width="formLabelWidth" >
          <el-select v-model="eventForm.type" filterable placeholder="请选择事件类型">
            <el-option label="买入" value="buy"></el-option>
            <el-option label="止盈" value="stopProfit"></el-option>
            <el-option label="止损" value="stopLoss" ></el-option>
            <el-option label="选股" value="filter" ></el-option>
          </el-select>
        </el-form-item>

        <el-form-item :label-width="formLabelWidth">
          <el-button size="medium" type="primary" @click="onAddTechnical()" >添加技术指标</el-button>
        </el-form-item>

        <el-form-item label="已选指标" :label-width="formLabelWidth" v-if="eventForm.list.length" >
          <template v-for="(item, index) of eventForm.list" >
            <span class="jq-tag" @click="onEditTechnical(item)" >
              <el-tag @close="onHandleClose(item, index)" closable >{{ item.name }} - {{ item.optionText }} - {{ item.value }} </el-tag>
            </span>
          </template>
        </el-form-item>
      </el-form>
    </el-tab-pane>
    <el-tab-pane label="代码">
      代码
    </el-tab-pane>
    <el-tab-pane label="说明">
      <el-input
        resize="none"
        type="textarea"
        :rows="13"
        placeholder="请输入内容"
        v-model="textarea">
      </el-input>
    </el-tab-pane>
  </el-tabs>

  <el-dialog title="添加指标" :visible.sync="dialogTechnicalVisible" >
    <el-form ref="form" :model="technicalForm" label-width="80px">
      <el-form-item label="选择指标" :label-width="formLabelWidth" >
        <el-select v-model="technicalForm.name" filterable placeholder="请选择指标">
          <el-option label="MA" value="ma"></el-option>
          <el-option label="MACD" value="macd" ></el-option>
          <el-option label="BOLL" value="boll" ></el-option>
        </el-select>
      </el-form-item>

      <el-form-item label="选择数值" :label-width="formLabelWidth" >
        <el-input v-model="technicalForm.value" placeholder="请输入数值" ></el-input>
      </el-form-item>

      <el-form-item label="选项" :label-width="formLabelWidth" >
        <el-radio-group v-model="technicalForm.option" >
          <el-radio label="0" >大于</el-radio>
          <el-radio label="1" >小于</el-radio>
          <el-radio label="2" >等于</el-radio>
        </el-radio-group>
      </el-form-item>

      <el-form-item label="是否必须" :label-width="formLabelWidth" >
        <el-radio-group v-model="technicalForm.isMust" >
          <el-radio label="0" >必须</el-radio>
          <el-radio label="1" >非必须</el-radio>
        </el-radio-group>
      </el-form-item>

      <el-form-item label="优先级" :label-width="formLabelWidth" >
        <el-input v-model="technicalForm.level" placeholder="请输入数值" ></el-input>
      </el-form-item>

      <el-form-item label="时间长度" :label-width="formLabelWidth" >
        <el-input v-model="technicalForm.length" placeholder="请输入时间长度" ></el-input>
      </el-form-item>
    </el-form>

    <div slot="footer" class="dialog-footer">
      <el-button @click="dialogTechnicalVisible = false">取 消</el-button>
      <el-button type="primary" @click="onSubmitAddTechnical()">确 定</el-button>
    </div>
  </el-dialog>
</div>
